<script setup>
const emit = defineEmits(["add"])
</script>

<template>
    <div class="AddTemplateCell" @click="emit('add')">
        <div class="image">
            <b-icon name="bi-plus-lg" size="80" style="color: #555" />
        </div>
        <div class="name">
            <el-text line-clamp="2">
                添加打印模板
            </el-text>
        </div>
    </div>
</template>

<style lang="scss" scoped>
.AddTemplateCell {
    margin-right: 20px;
    margin-bottom: 20px;
    width: 240px;
    height: 330px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);

    .image {
        box-sizing: border-box;
        width: 100%;
        height: 240px;
        background: #fff;
        overflow: hidden;
        padding: 10px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }

    .name {
        padding: 10px;
        font-size: 16px;
        font-weight: bold;
    }

    &:active {
        opacity: 0.7;
    }
}
</style>